package com.yuxinyang.memory.admin.user.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yuxinyang.memory.admin.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 第三方用户信息表
 * </p>
 *
 * @author 余秀良
 * @since 2019-08-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class MemoryUserOauth extends BaseEntity implements Serializable {
    public static final String ID = "id";
    public static final String USER_ID = "user_id";
    public static final String OAUTH_TYPE = "oauth_type";
    public static final String OAUTH_ID = "oauth_id";
    public static final String UNION_ID = "union_id";
    public static final String OAUTH_ACCESS_TOKEN = "oauth_access_token";
    public static final String OAUTH_EXPIRES = "oauth_expires";
    public static final String CREATE_TIME = "create_time";
    public static final String UPDATE_TIME = "update_time";
    public static final String REMARK = "remark";
    private static final long serialVersionUID = 7804146606411715774L;
    /**
     * 用户表id
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 第三方登陆类型 weibo、qq、wechat 等
     */
    @TableField("oauth_type")
    private String oauthType;
    /**
     * 第三方 uid 、openid 等
     */
    @TableField("oauth_id")
    private String oauthId;
    /**
     * QQ / 微信同一主体下 Unionid 相同
     */
    @TableField("union_id")
    private String unionId;
    /**
     * 第三方的token
     */
    @TableField("oauth_access_token")
    private String oauthAccessToken;
    /**
     * 过期时间
     */
    @TableField("oauth_expires")
    private Long oauthExpires;

}
